<?php
// +----------------------------------------------------------------------
// | ThinkPHP [ WE CAN DO IT JUST THINK ]
// +----------------------------------------------------------------------
// | Copyright (c) 2006~2018 http://thinkphp.cn All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: liu21st <liu21st@gmail.com>
// +----------------------------------------------------------------------
use think\Route;
// restful风格API

Route::resource(':version/user','app/:version.User');
Route::resource(':version/vip','app/:version.Vip');
Route::resource(':version/app','app/:version.App');
Route::resource(':version/click','app/:version.Click');
Route::resource(':version/collect','app/:version.Collect');
Route::resource(':version/message','app/:version.Message');
Route::resource(':version/order','app/:version.Order');
Route::resource(':version/pv','app/:version.Pv');
Route::resource(':version/request','app/:version.Request');
Route::resource(':version/sysoption','app/:version.SysOption');
Route::resource(':version/team','app/:version.Team');
Route::resource(':version/card','app/:version.Card');
Route::resource(':version/teamspread','app/:version.TeamSpread');
Route::resource(':version/coupon','app/:version.Coupon');
Route::resource(':version/redpacket','app/:version.RedPacket');

//app
//登录
Route::rule(':version/login','app/:version.App/login');
Route::rule(':version/wxcheck','app/:version.App/wxCheck');
Route::rule(':version/test','app/:version.App/test');


//用户
Route::rule(':version/user','app/:version.User/index','OPTIONS');
Route::rule(':version/updateuserinfo','app/:version.User/updateUserInfo');
Route::rule(':version/user','app/:version.User/read','OPTIONS');
Route::rule(':version/invite','app/:version.User/invite');
Route::rule(':version/getaddress','app/:version.User/getAddress');


//名片
Route::rule(':version/card','app/:version.Card/read','OPTIONS');
Route::rule(':version/card','app/:version.Card/index','OPTIONS');
Route::rule(':version./card','app/:version.Card/save','OPTIONS');
Route::rule(':version/updatecard','app/:version.Card/updateCard');
// Route::rule(':version/getmycard','app/:version.Card/getMyCard');
Route::rule(':version/postcard','app/:version.Card/postCard');
Route::rule(':version/uploadimg','app/:version.Card/uploadImg');
Route::rule(':version/getqrcode','app/:version.Card/getQRCode');
Route::rule(':version/getaccesstoken','app/:version.Card/getAccessToken');
Route::rule(':version/deletecard','app/:version.Card/deleteCard');


//会员
Route::rule(':version/vip','app/:version.Vip/index','OPTIONS');
Route::rule(':version/vip','app/:version.Vip/save','OPTIONS');


//点赞
Route::rule(':version/click','app/:version.Click/save','OPTIONS');
Route::rule(':version/click','app/:version.Click/index','OPTIONS');
Route::rule(':version/getmyclicklist','app/:version.Click/getMyClickList');


//收藏
Route::rule(':version/collect','app/:version.Collect/index','OPTIONS');
Route::rule(':version/collect','app/:version.Collect/save','OPTIONS');
Route::rule(':version/cancelcollect','app/:version.Collect/cancelCollect');
Route::rule(':version/getmycollectlist','app/:version.Collect/getMyCollectList');


//浏览
Route::rule(':version/pv','app/:version.Pv/index','OPTIONS');
Route::rule(':version/getmypvlist','app/:version.Pv/getMyPvList');

//留言
Route::rule(':version/message','app/:version.Message/index','OPTIONS');
Route::rule(':version/message','app/:version.Message/save','OPTIONS');


//需求
Route::rule(':version/request','app/:version.Request/index','OPTIONS');
Route::rule(':version/request','app/:version.Request/save','OPTIONS');


//团队
Route::rule(':version/team','app/:version.Team/save','OPTIONS');
Route::rule(':version/team','app/:version.Team/delete','OPTIONS');
Route::rule(':version/team','app/:version.Team/index','OPTIONS');
Route::rule(':version/team','app/:version.Team/update','OPTIONS');
Route::rule(':version/out','app/:version.Team/Out');


//团队分布
Route::rule(':version/teamspread','app/:version.TeamSpread/index','OPTIONS');
Route::rule(':version/teamspread','app/:version.TeamSpread/delete','OPTIONS');


//优惠券
Route::rule(':version/coupon','app/:version.Coupon/index','OPTIONS');
Route::rule(':version/coupon','app/:version.Coupon/save','OPTIONS');
Route::rule(':version/coupon','app/:version.Coupon/read','OPTIONS');
Route::rule(':version/receivecoupon','app/:version.Coupon/receiveCoupon');
Route::rule(':version/ischange','app/:version.Coupon/isChange');
Route::rule(':version/mypublishcoupon','app/:version.Coupon/myPublishCoupon');
Route::rule(':version/couponlist','app/:version.Coupon/couponList');
Route::rule(':version/getcoupondeatilbyid','app/:version.Coupon/getCouponDeatilById');


//系统设置
Route::rule(':version/sysoption','app/:version.SysOption/index','OPTIONS');


//红包
//发红包
Route::rule(':version/redpacket','app/:version.RedPacket/save','OPTIONS');
//领红包
Route::rule(':version/recieveredpacket','app/:version.RedPacket/recieveRedPacket');
//微信统一下单
Route::rule(':version/wechatorder','app/:version.RedPacket/WeChatOrder');
//回调地址
Route::rule(':version/notifyurl','app/:version.RedPacket/notifyUrl');
